import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

import emp.java.poo.employee;

class Deserialization
{
	public static void main(String [] args)
	{
		employee e= null;
		try
		{
			
			FileInputStream fileIn = new FileInputStream("employee.ser");
			ObjectInputStream in = new ObjectInputStream(fileIn);
			e = (employee) in.readObject();
			in.close();
			fileIn.close();
		}
	
		catch (IOException i)
		{
			i.printStackTrace();
			return;
		}
		catch (ClassNotFoundException c)
		{
			System.out.println("employee class not found");
			c.printStackTrace();
			return;
		}
		System.out.println("deserialized Employee");
		System.out.println("name:" +e.name);
		System.out.println("Address: " +e.address);
		System.out.println("SSN: "  +e.SSN);
		System.out.println("Number: " +e.number);
	}
}
